home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
activate.zip
/
ACTIVATE.DOC
< prev
next >
Wrap
Text File
|
1992-12-04
|
3KB
|
75 lines
Activate v1.01 Hard Disk Partition selector
Author: Ronan Mullally October 1992.
< year3-23@midir.ucd.ie >
< H235_003@ccvax.ucd.ie >
< ronan@bermuda.ucd.ie >
< ronan.mullally@f151.n263.z2.fidonet.org >
Usage: Activate [-d] [-l] [partition #]
-d: Deactivate given partition #
-l: List partition Table(s)
# : Number of partition to (De)Activate
if no command line params are given -l is assumed
This is a fairly simple program to switch between the various partitions
you might want to boot off on your hard disk(s). It provides a means of
setting / resetting the bootable flag on your partitions without having
to resort to fdisk (which has the potential to do a lot of damage!)
USE THIS PROGRAM AT YOUR OWN RISK! I make no guarentees that it will
not damage your data - all I will say is that it has done no harm to my
system - yet! My own setup is with IDE drives: either 1 Quantum LP240,
or 2 Seagate ST-157A's, depending on whether I'm using Coherent, DOS,
or Linux - I've had no trouble with this configuration - I know absolutely
nothing about how non-IDE drives might behave.
The source code is, hopefully, fairly portable. I originally wrote it
under Turbo C++ v3.0, then worked on a *nix based version under Coherent
v4.0.0. The only routines which are implementation dependant are stored
seperately in the act-dos.c and act-ndos.c files (for MS-DOS and non-DOS
systems respectively). These consist of the routines for accessing the
hard disk(s). The DOS version uses the TC biosdisk() routine which
accesses the drives via int 13h.
The *nix version reads / writes to the hard drive by simply opening the
drive's device (in my case /dev/rat0x, replace this with whatever is
appropriate) and using fread() / fwrite(); The determine_number_of_drives()
function is a bit of a 'cop-out', rather than trying to detect how many
drives are attached to the system I simply return a pre-defined constant -
set this (NUM_DRIVES) to whatever is appropriate.
Everything you need to configure the program should be in the config.h
file, simply set up the correct number of drives, and (for *nix) their
names, then just compile.
The program allows for 4 (primary) partitions on each drive - if you enter
too large a partition number (say 9 on a 2 drive system) it will abort.
It also only allows you to set 1 partition per drive as active - it will
disable all partitions on the relevant drive first, then make the given
partition active. This can be changed by playing with the for-loop around
the '/* Deactivate all first */' comment.
This is the first (hopefully) useful program I've written for *nix, so
I'm sure there's plenty of room for improvement :-) I'd greatly appreciate
any comments, and suggestions (even flames!) via the email addresses above
- the midir and ccvax addresses are only good until mid summer 1993, the
bermuda address has a habit of bouncing mail not sent using SMTP, and I
have yet to receive any non-Fidonet mail at the fido address, so if you
_really_ want to contact me you can resort to snail-mail to:
Ronan Mullally,
320 Sutton Park,
Sutton,
Dublin 13,
Ireland.